<%@ page contentType="text/html; charset=utf-8" errorPage="../error.jsp"%>

<div align="center">

	<table width="900" border="0" cellspacing="1" cellpadding="1">
		<tr>
			<br>
			<td><%@include file="../top.jsp"%><br></td>
		</tr>
			<td><div align="center">

					<table width="80%" border="0" cellpadding="1" cellspacing="1"
						class="td">
						<form name="form1"
							action="<%=path%>/admin/BookAction_updateBooks.action"
							method="post">
							<s:iterator value="#session.modify_book" var="var">

								<tr>
									<td>书号</td>
									<td><s:property value="#var.bookid" /><input
										name="bookid" type="hidden"
										value="<s:property value="#var.bookid" />"></td>
								</tr>
								<tr>
									<td>书名</td>
									<td><input name="bookname" type="text" size="25"
										value="<s:property value="#var.bookname" />"></td>
								</tr>
								<tr>
									<td>作者</td>
									<td><input name="author" type="text" size="25"
										value="<s:property value="#var.author" />"></td>
								</tr>
								<tr>
									<td>出版社</td>
									<td><select name="publisherid">
											<s:iterator value="#session.publishers" var="varp">
												<option value="<s:property value="#varp.publisherid"/>"  <s:if test="#var.publisherid==#varp.publisherid">selected="selected" </s:if>><s:property
														value="#varp.name" />
												</option>
											</s:iterator>
									</select></td>
								</tr>
								<tr>
									<td>出版日期</td>
									<td><input name="pubdate" type="text" size="25"
										value="<s:property value="#var.pubdate" />"></td>
								</tr>
								<tr>
									<td>价格</td>
									<td><input name="price" type="text" size="25"
										value="<s:property value="#var.price" />"></td>
								</tr>
								<tr>
									<td>库存数量</td>
									<td><input name="quantity" type="text" size="25"
										value="<s:property value="#var.quantity" />"></td>
								</tr>
								<tr>
									<td>存储位置</td>
									<td><input name="place" type="text" size="25"
										value="<s:property value="#var.place" />"></td>
								</tr>
								<tr>
									<td>类别</td>
									<td><select name="type">
											<option value="0" <s:if test="#var.type==0">selected="selected" </s:if>>普通</option>
											<option value="1" <s:if test="#var.type==1">selected="selected"</s:if>>新书</option>
											<option value="2" <s:if test="#var.type==2">selected="selected" </s:if>>精品</option>
									</select></td>
								</tr>
								<tr>
									<td>内容简介</td>
									<td><textarea name="content" cols="70" rows="10"><s:property
												value="#var.content" /></textarea></td>
								</tr>
								<tr>
									<td colspan="2"><div align="center">
											<input type="submit" value=" 修改 ">&nbsp;&nbsp;&nbsp;&nbsp;
											<input type="reset" value=" 重置 ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
										</div></td>
								</tr>


							</s:iterator>
						</form>
						<tr>
							<td colspan="2"><hr size="1" noshade width="100%"></td>
						</tr>
						<tr>
							<td colspan="2"><div align="center">
									<table width="100%" border="0" cellpadding="1" cellspacing="1"
										class="td">
										<form name="form2"
											action="bookedit.jsp?op=upload&bookid=<s:property value="#var.bookid" />"
											method="post" enctype="multipart/form-data">
											<tr>
												<td width="20%"><img
													src="../images/<s:property value="#var.picture" />"
													height="120" width="85"></td>
												<td width="80%">封面图片<br> <input type="file"
													name="picture" size="25"> &nbsp;&nbsp;&nbsp;&nbsp;
													<input type="submit" value=" 上传图片 "></td>
											</tr>
										</form>
									</table>

								</div></td>
						</tr>

					</table>

				</div></td>
		</tr>
		
	</table>
</div>
